<%@page contentType="text/html" pageEncoding="UTF-8"%>  
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<jsp:include page="header.jsp"/>   

<jsp:include page="navMenu.jsp"/> 


<h1>Mes albums partagé</h1>

    <table class="table table-striped table-hover">
        <c:choose>
            <c:when test="${not empty requestScope['albumList']}">
                <tr>
                    <th>Nom d'album</th>
                    <th>Proprietaire</th>
                    <th>Actions</th>
                </tr>
            </c:when>
            <c:otherwise>
                <span class="messageAucun">Vous n'avez aucun album partagé</span>
            </c:otherwise>
        </c:choose>
        <c:forEach var="album" items="${requestScope['albumList']}" >
            <tr class="info">
                <td style="font-weight: bold;">${album.getName()}</td>
               <td style="font-weight: bold;">${album.utilisateur.identifiant}</td>
                <td><a href="${pageContext.request.contextPath}/Album?action=ouvrirAlbum&album=${album.id}"><button class="btn btn-primary">Ouvrir</button></a></td>
            </tr>
        </c:forEach> 
    </table>


<jsp:include page="footer.jsp"/>   